
/**
 * @cat Google
 * @name Renaissance.GoogleWebSearch
 * @desc google web search wrapper
 * @return {Object} object
 */
function Renaissance.GoogleWebSearch() {
	this.requester = new Renaissance.JsonRequest('http://www.google.com/uds/GwebSearch?callback={callback}&rsz=large&v=0.1&context=0');
}
/**
 * @cat Google
 * @name Renaissance.GoogleWebSearch.prototype.search
 * @desc perform search
 * @param {Function} callback callback function to handle the resutls
 * @param {String} query search query
 * @param {Object} parameters optional parameters to pass to Google search interface
 */
Renaissance.GoogleWebSearch.prototype.search = function (callback, query, parameters) {
	var parameters = parameters ? parameters : {};
	parameters['q'] = query;
	parameters['key'] = parameters['key'] ? parameters['key'] : 'internal-documentation';

	return this.requester.request(function (c, data) {
		callback.call(callback, data.results);
	}, parameters);
};
